package com.example.wnn.develop.other;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;

public class xiufu {
/*
3923	JD0000007281692,JD0100008446481,JD0100041851592,JD0100046404026,JD0100057748833,STB1101352183EA
3934	JD0100012434971,JD0100048760480,JD0100011256806,JD0100055527371
/Users/wenzheng/Desktop/shop
*/

    public  static   String goodsSku = "";
    public  static   Integer rechargeid =3923;

    public static void main(String[] args) throws IOException {

        List<String> sukList = Arrays.asList(goodsSku.split(","));
        System.out.println("INSERT INTO sx_recharge_limit (id,rechargeid,goodssku,limitnumbers,vstatus,crtime) VALUES");

        for (int i = 0; i < sukList.size(); i++) {
            String base = "('%s',%s,'%s',0,100,now())%s";
            String uuid= UUID.randomUUID().toString().replace("-","");
            String endOf = sukList.size()-1==i?";":",";
            String sqlStr = String.format(base, uuid,rechargeid,sukList.get(i),endOf);

            System.out.println(sqlStr);
        }

    }
}
